<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Notification extends MY_Controller {

	function __construct() {
		parent::__construct();
	}
	
	public function index()
	{
		if ($this->isSessionActive()) {

			$this->load->model('Notification_model');
			$data['notifications'] = $this->Notification_model->get_notifications($this->fb_id);						
			$this->Notification_model->clear_new_notifications($this->fb_id);
			
			$data['user'] = $this->fb_id;
			$data['title'] = 'Your Notifications';
			$data['content_view'] = 'notification_view';
			$data['stylesheets'] = array('paginate-style', 'notifications');
			$data['javascripts'] = array('paginate', 'notification_paginate');
			

    		$this->load_template_view($data, TRUE);
		}
	}
	
}